package com.glorysoft.knowlespda.ui.engineering.viewmodel

import com.glorysoft.knowlespda.base.BaseViewModel
import com.glorysoft.knowlespda.base.Constant
import com.glorysoft.knowlespda.model.TrackRepository
import com.google.gson.JsonObject

/**
 * FileName: EngineeringViewModel
 * Author: XJH
 * Date: 2022/8/5 15:59
 * Description:
 * History:
 */
class EngineeringViewModel : BaseViewModel() {

    val repository = TrackRepository()

    fun submit(s : String){
        var map = JsonObject()
        map.addProperty("OPID", Constant.CURRENT_USER)
        map.addProperty("MACHINEID", s)
        launchOnlyResult({
            repository.getEngineeringSubmit(map)
            defUI.startActivity.call()
        })
    }
}